<%@ Register TagPrefix="uc1" TagName="ucTestata" Src="../controlli/ucTestata.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" CodeFile="corsi.aspx.vb" Inherits="corsi" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>SICOP</title><!--#Include File="../lib/calendar.asp"-->
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="../style.css" type="text/css" rel="StyleSheet">
		<script language="JavaScript">
				function apri(s,p){ 
					
					p = p + 'toolbar=no,location=no,menubar=no,resizable=yes,status=no,titlebar=no,scrollbars=yes,directories=no';
					window.open(s,null,p);
									}			
									
				<%getComuni%>
				
				function handleKeyUp(maxNumToShow)
{
    var selectObj, textObj, functionListLength;
    var i, searchPattern, numShown;

    // Set references to the form elements
    selectObj = document.forms[0].dComuni;
    textObj = document.forms[0].cerca;

    // Remember the function list length for loop speedup
    functionListLength = comuni.length;

    // Set the search pattern depending
    searchPattern = "^"+textObj.value;

    // Create a regulare expression
    re = new RegExp(searchPattern,"gi");
    // Clear the options list
    selectObj.length = 0;

    // Loop through the array and re-add matching options
    numShown = 0;
    for(i = 0; i < functionListLength; i++)
    {
        if(comuni[i].search(re) != -1)
        {
            selectObj[numShown] = new Option(comuni[i],codComuni[i]);
            numShown++;
        }
        // Stop when the number to show is reached
         if(numShown == maxNumToShow)
         {
            break;
         }
    }
    // When options list whittled to one, select that entry
    if(selectObj.length == 1)
    {
        selectObj.options[0].selected = true;
    }
   
    selectObj.selectedIndex = document.forms[0].numero.value;

}




// this function gets the selected value and loads the appropriate
// php reference page in the display frame
// it can be modified to perform whatever action is needed, or nothing
function handleSelectClick()
{
    selectObj = document.forms[0].dComuni;
    textObj = document.forms[0].cerca;
	if (selectObj.options.length>0 )
	{
		selectedValue = selectObj.options[selectObj.selectedIndex].value;

		selectedValue = selectedValue.replace(/_/g, '-') ;
		document.forms[0].codice.value=selectedValue;
		document.forms[0].numero.value = selectObj.selectedIndex;
		document.forms[0].desc.value = selectObj.options[selectObj.selectedIndex].text;
		document.forms[0].cerca.value = selectObj.options[selectObj.selectedIndex].text;
	}
}
	
			--></script>
	</HEAD>
	<body onload=" handleKeyUp(20); " MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			&nbsp;
			<div align="center">
				<table id="tabella di contorno" style="BORDER-RIGHT: 1px; BORDER-TOP: 1px; BORDER-LEFT: 1px; BORDER-BOTTOM: 1px"
					borderColor="#de0029" cellSpacing="0" width="700" celladding="0">
					<tr>
						<td width="100%" bgColor="#de0029">
							<!-- testata --><uc1:uctestata id="UcTestata1" runat="server"></uc1:uctestata>
							<!-- fine testata -->
							<table cellSpacing="0" cellPadding="0" width="700" bgColor="#ffffff" border="0">
								<tr>
									<td vAlign="top" align="left" width="700">
										<p>
											<table id="Table2" cellSpacing="0" cellPadding="0" width="100%" border="0">
												<tr>
													<td colSpan="4"><IMG height="10" src="../images/x.gif" width="1"></td>
												</tr>
												<tr>
													<td width="6"><IMG height="1" src="../images/x.gif" width="1"></td>
													<td colSpan="3"><A href="../home.aspx"><span class="blu"><b>&gt; Home</b></span></A>&nbsp;<A href="crediti.aspx"><SPAN class="blu"><B>&gt; 
																	Crediti</B></SPAN></A></td>
												</tr>
												<tr>
													<td colSpan="4"><IMG height="10" src="../images/x.gif" width="1"></td>
												</tr>
												<tr>
													<td width="6"><IMG height="1" src="../images/x.gif" width="1"></td>
													<td style="WIDTH: 36px"><IMG height="11" src="../images/quadratino_rosso.gif" width="10"></td>
													<td><span class="titolo">Gestione eventi</span></td>
													<td align="right">
														<!-- inizio tabelle tasti -->
														<!-- fine tabelle tasti --></td>
												</tr>
											</table>
										</p>
									</td>
								</tr>
								<tr>
									<td><IMG height="10" src="../images/x.gif"></td>
								</tr>
							</table>
							<table cellSpacing="0" cellPadding="0" width="700" bgColor="white" border="0">
								<TR>
									<td vAlign="top" align="left" width="6"><IMG height="1" src="../images/x.gif" width="6" border="0"></td>
									<TD vAlign="top" align="left" width="694">
										<TABLE borderColor="#1a49a3" cellSpacing="1" cellPadding="4" width="100%" bgColor="#ffffff"
											border="1">
											<TBODY>
												<TR>
													<TD><SPAN class="blu"><B>Ricerca:</B></SPAN>
													</TD>
													<TD><SPAN class="nero">Titolo:</SPAN><BR>
														<asp:textbox id="txCercaTitolo" runat="server" CssClass="nero" Width="186px"></asp:textbox></TD>
													<TD><SPAN class="nero">Anno:</SPAN><BR>
														<asp:textbox id="txCercaAnno" runat="server" CssClass="nero" Width="48px"></asp:textbox></TD>
													<TD><SPAN class="nero">Data inizio:</SPAN><BR>
														<asp:textbox id="txCercaData" runat="server" Width="70px" CssClass="nero" ReadOnly="True"></asp:textbox><IMG height="1" src="../images/x.gif" width="5" border="0"><IMG onclick="fPopCalendar(txCercaData,txCercaData);" height="16" src="../images/calbutton.gif"
															width="16" border="0"></TD>
													<TD><SPAN class="nero">Interno/Esterno</SPAN><BR>
														<asp:dropdownlist id="dCercaInt" runat="server" CssClass="nero" DataTextField="descrizione" DataValueField="codice">
															<asp:ListItem></asp:ListItem>
															<asp:ListItem Value="1">Interno</asp:ListItem>
															<asp:ListItem Value="2">Esterno</asp:ListItem>
														</asp:dropdownlist></TD>
													<TD><asp:linkbutton id="lkCerca" CssClass="blu" CausesValidation="False" Runat="server">cerca</asp:linkbutton></TD>
												</TR>
											</TBODY>
										</TABLE>
										<br>
										<span class="blu"><b></b></span>
										<asp:datagrid id="dgEventi" runat="server" Width="100%" PagerStyle-Position="Top" PagerStyle-Mode="NumericPages"
											AutoGenerateColumns="False" AllowSorting="True" PagerStyle-CssClass="ordinato" BorderColor="#1A49A3"
											GridLines="Horizontal" AllowPaging="True" PageSize="15">
											<ItemStyle CssClass="nero"></ItemStyle>
											<HeaderStyle Font-Bold="True" CssClass="blu"></HeaderStyle>
											<Columns>
												<asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
												<asp:TemplateColumn>
													<HeaderStyle VerticalAlign="Top"></HeaderStyle>
													<ItemStyle CssClass="nero"></ItemStyle>
													<HeaderTemplate>
														<span class="blu"><b>Titolo</b></span>
													</HeaderTemplate>
													<ItemTemplate>
														<asp:LinkButton id="lkVedi" CausesValidation="False" text='<%# DataBinder.Eval(Container.DataItem, "titolo") %>' CssClass="nero_bold" CommandName="vedi" runat="Server">
														</asp:LinkButton>
													</ItemTemplate>
												</asp:TemplateColumn>
												<asp:BoundColumn DataField="anno" HeaderText="Anno"></asp:BoundColumn>
												<asp:BoundColumn DataField="Edizione" HeaderText="Edizione"></asp:BoundColumn>
												<asp:BoundColumn DataField="Data" HeaderText="Data Inizio"></asp:BoundColumn>
												<asp:TemplateColumn>
													<ItemTemplate>
														<asp:LinkButton Runat="server" CausesValidation="False" ID="lkElimina" CommandName="elimina" CssClass="blu"><img src="../images/elimina.gif" border="0">&nbsp;elimina</asp:LinkButton>
													</ItemTemplate>
												</asp:TemplateColumn>
												<asp:TemplateColumn>
													<ItemTemplate>
														<A href='iscEventi.aspx?id=<%# DataBinder.Eval(Container.DataItem, "id") %>'><span class="blu">
																iscrizioni</span></A>
													</ItemTemplate>
												</asp:TemplateColumn>
											</Columns>
											<PagerStyle Position="Top" CssClass="ordinato" Mode="NumericPages"></PagerStyle>
										</asp:datagrid>
										<p><a name="bkA">
												<TABLE borderColor="#1a49a3" cellSpacing="1" cellPadding="4" width="100%" bgColor="#ffffff"
													border="1">
													<TBODY>
														<TR>
															<TD style="HEIGHT: 27px" colSpan="3"><SPAN class="blu"><B>Dati&nbsp;evento</B></SPAN>
																<asp:textbox id="txId" Visible="False" Runat="server"></asp:textbox><asp:linkbutton id="lkNuovo" Runat="server" CausesValidation="False" CssClass="blu"><img src="../images/aggiungi.gif" border="0">&nbsp;aggiungi</asp:linkbutton><INPUT id="codice" style="WIDTH: 56px; HEIGHT: 22px" type="hidden" size="4" name="codice"
																	runat="server"><INPUT id="desc" style="WIDTH: 56px; HEIGHT: 22px" type="hidden" size="4" name="desc" runat="server"><INPUT id="numero" style="WIDTH: 56px; HEIGHT: 22px" type="hidden" size="4" name="numero"
																	runat="server"></TD>
														</TR>
														<TR>
															<td vAlign="top"><SPAN class="nero">Anno</SPAN><BR>
																<asp:textbox id="txAnno" runat="server" Width="50px" CssClass="nero"></asp:textbox><asp:regularexpressionvalidator id="RegularExpressionValidator3" runat="server" CssClass="nero" ControlToValidate="txAnno"
																	ErrorMessage="Formato errato" ValidationExpression="\d{4}"></asp:regularexpressionvalidator></td>
															<TD><SPAN class="nero">N. edizione</SPAN><BR>
																<asp:textbox id="txEdizione" runat="server" Width="50px" CssClass="nero"></asp:textbox></TD>
															<TD vAlign="top"><SPAN class="nero">N. Crediti</SPAN><BR>
																<asp:textbox id="txCrediti" runat="server" Width="50px" CssClass="nero"></asp:textbox><asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" CssClass="nero" ControlToValidate="txCrediti"
																	ErrorMessage="Formato errato" ValidationExpression="\d{1,2}"></asp:regularexpressionvalidator></TD>
														</TR>
														<TR>
															<TD vAlign="top"><SPAN class="nero">Comune<BR>
																	cerca:<INPUT class="nero" id="cerca" onkeyup="handleKeyUp(20);" type="text" size="17" name="cerca"
																		runat="server"></SPAN><br>
																<SELECT class="nero" id="dComuni" onclick="handleSelectClick();" size="1" name="dComuni"
																	runat="server" onserverchange="selProv">
																</SELECT><BUTTON class="nero" id="Button1" type="button" runat="server" CausesValidation="False"
																	OnServerClick="Button_Click">ok</BUTTON>
															</TD>
															<TD style="WIDTH: 201px" vAlign="top" colSpan="2"><SPAN class="nero">Provincia</SPAN><BR>
																<asp:dropdownlist id="dProvincia" runat="server" CssClass="nero" DataValueField="codice" DataTextField="descrizione"></asp:dropdownlist></TD>
														</TR>
														<tr>
															<TD vAlign="top"><SPAN class="nero">Tipo</SPAN><BR>
																<asp:dropdownlist id="dTipo" runat="server" CssClass="nero" DataValueField="codice" DataTextField="descrizione">
																	<asp:ListItem></asp:ListItem>
																	<asp:ListItem Value="1">Contanti</asp:ListItem>
																	<asp:ListItem Value="2">Bonifico</asp:ListItem>
																</asp:dropdownlist></TD>
															<TD vAlign="top" colSpan="2"><SPAN class="nero">Dettaglio</SPAN><BR>
																<asp:dropdownlist id="dDettaglio" runat="server" CssClass="nero" DataValueField="codice" DataTextField="descrizione">
																	<asp:ListItem></asp:ListItem>
																	<asp:ListItem Value="1">Contanti</asp:ListItem>
																	<asp:ListItem Value="2">Bonifico</asp:ListItem>
																</asp:dropdownlist></TD>
														</tr>
														<TR>
															<TD><SPAN class="nero">Titolo</SPAN><BR>
																<asp:textbox id="txTitolo" runat="server" Width="288px" CssClass="nero" TextMode="MultiLine"></asp:textbox><asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" CssClass="nero" ControlToValidate="txTitolo"
																	ErrorMessage="Obbligatorio"></asp:requiredfieldvalidator></TD>
															<td><SPAN class="nero">N. giorni</SPAN><BR>
																<asp:textbox id="txGiorni" runat="server" Width="70px" CssClass="nero"></asp:textbox><asp:regularexpressionvalidator id="RegularExpressionValidator2" runat="server" CssClass="nero" ControlToValidate="txGiorni"
																	ErrorMessage="Formato errato" ValidationExpression="\d{1,4}"></asp:regularexpressionvalidator></td>
															<TD><SPAN class="nero">N. ore</SPAN><BR>
																<asp:textbox id="txOre" runat="server" Width="50px" CssClass="nero"></asp:textbox><asp:regularexpressionvalidator id="RegularExpressionValidator4" runat="server" CssClass="nero" ControlToValidate="txOre"
																	ErrorMessage="Formato errato" ValidationExpression="\d{1,4}"></asp:regularexpressionvalidator></TD>
														</TR>
														<TR>
															<TD><SPAN class="nero">Data inizio</SPAN><BR>
																<asp:textbox id="txDataInizio" runat="server" Width="70px" CssClass="nero" ReadOnly="True"></asp:textbox><IMG height="1" src="../images/x.gif" width="5" border="0"><IMG onclick="fPopCalendar(txDataInizio,txDataInizio);" height="16" src="../images/calbutton.gif"
																	width="16" border="0">&nbsp;
															</TD>
															<TD><SPAN class="nero">Data fine</SPAN><BR>
																<asp:textbox id="txDataFine" runat="server" Width="70px" CssClass="nero" ReadOnly="True"></asp:textbox><IMG height="1" src="../images/x.gif" width="5" border="0"><IMG onclick="fPopCalendar(txDataFine,txDataFine);" height="16" src="../images/calbutton.gif"
																	width="16" border="0">&nbsp;
															</TD>
															<TD><SPAN class="nero">Chiuso</SPAN><BR>
																<asp:checkbox id="chkChiuso" runat="server"></asp:checkbox></TD>
														</TR>
														<tr>
															<TD><SPAN class="nero">Ente</SPAN><BR>
																<asp:dropdownlist id="dEnte" runat="server" CssClass="nero" DataValueField="codice" DataTextField="descrizione"></asp:dropdownlist><BR>
																<asp:textbox id="txEnte" runat="server" Width="216px" CssClass="nero"></asp:textbox>
																<asp:linkbutton id="lkAddEnte" CssClass="blu" Runat="server" CausesValidation="False"><img src="../images/aggiungi.gif" border="0">&nbsp;aggiungi</asp:linkbutton></TD>
															<TD><SPAN class="nero">Interno/Esterno</SPAN><BR>
																<asp:dropdownlist id="dIntEst" runat="server" CssClass="nero" DataTextField="descrizione" DataValueField="codice">
																	<asp:ListItem></asp:ListItem>
																	<asp:ListItem Value="1">Interno</asp:ListItem>
																	<asp:ListItem Value="2">Esterno</asp:ListItem>
																</asp:dropdownlist></TD>
															<TD><SPAN class="nero">Avvallo C.N.</SPAN><BR>
																<asp:checkbox id="chkAvvallo" runat="server"></asp:checkbox></TD>
														</tr>
													</TBODY>
												</TABLE>
												<table width="100%">
													<TR>
														<TD align="right" colSpan="3">&nbsp;&nbsp;&nbsp;&nbsp;
															<asp:linkbutton id="lkSalva" Runat="server" CssClass="blu"><img src="../images/salva.gif" border="0">&nbsp;salva</asp:linkbutton>&nbsp;
															<asp:linkbutton id="lkAnnulla" Runat="server" CausesValidation="False" CssClass="blu"><img src="../images/annulla.gif" border="0">&nbsp;annulla</asp:linkbutton>&nbsp;
														</TD>
													</TR>
												</table>
										</p>
										</A>
									</TD>
									<td style="HEIGHT: 13px" vAlign="top" align="left" width="6"><IMG height="1" src="images/x.gif" width="6" border="0"></td>
								</TR>
							</table>
							<!-- tabella di chiusura -->
							<TABLE id="chiusura" cellSpacing="0" cellPadding="0" width="100%" bgColor="#fff8f9">
								<tr>
									<td height="5"><IMG height="5" alt="" src="../images/x.gif"></td>
								</tr>
								<tr>
									<td background="../images/chiusuraRossa.gif" height="14">
										<div align="center"><b><font face="Tahoma" color="#ffffff" size="1">Techno<i>service</i> 2005. 
													All rights reserved</font></div>
										</B></td>
								</tr>
							</TABLE>
							<!-- chiusura tabella di bordo --></td>
					</tr>
				</table>
				</TD></TR></TBODY></TABLE></div>
		</form>
	</body>
</HTML>
